import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import "../src/plugins/elements"

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

//全局变量
import Golbe from './Globe'
Vue.use(Golbe)
import Vant from 'vant';
import 'vant/lib/index.css';
//时间
Vue.filter('dataForm',function(v){
  const dt=new Date(v)
  const y=dt.getFullYear()  
  const m=(dt.getMonth()+1+"").padStart(2,'0')  
  
  const d=(dt.getDate()+"").padStart(2,'0')   
  const hh=(dt.getHours()+"").padStart(2,'0')   
  const mm=(dt.getMinutes()+"").padStart(2,'0')   
  const ss=(dt.getSeconds()+"").padStart(2,'0')  

  return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
})
Vue.use(Vant);
//全局组件
import MyList from './components/MyList.vue'
Vue.component(MyList.name,MyList)
//登陆全局组件
import Login from './views/login.vue'
Vue.component('LoginName',Login)
//注册全局组件
import register from './views/register.vue'
Vue.component(register.name,register)

Vue.use(ElementUI);
Vue.config.productionTip = false
Vue.prototype.$axios = axios
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

